// Avoid horizontal flickering when scrollbar appears
body {
  overflow-y: scroll;
}

/* Containers
================*/
.container {
  margin: auto;
  width: 100%;
  max-width: $max-width;
  float: none;
}
.row {
  float: left;
}
.text-right {
  text-align: right;
}
section {
  min-height: 550px;
  width: 100%;
  float: left;
  position: relative;

  &.oddbg {
    background-color: #f9fafb;
  }

  @include medium-mq {
    padding: 0 16px;
  }

  &.hero-section {
    background: $hero-color;
    color: $hero-color-accent;
    padding-top: $navigation-height * 1.5;

    .container {
      margin-top: 40px;
    }

    .relative {
      margin-top: 4em;
      float: left;
      width: 100%;
      display: none;

      body.index & {
        display: block;
      }
    }

    .icon {
      width: 20px;
      height: 20px;
      display: block;
      position: relative;

      &:after {
        position: absolute;
        display: block;
        content: '';
        width: 16px;
        height: 2px;
        background: $hero-color-accent;
        top: 30px;
        left: 0;
        right: 0;
        margin: auto;
        opacity: 0.5;
      }
    }

    h1 {
      line-height: 22px;
      padding: 16px 0;
      margin-top: 32px;
    }

    h3 {
      font-size: 20px;
      color: $hero-color-accent;
      font-weight: 400;
      padding: 8px 0;
    }

    @include small-mq {
      text-align: center;
      padding-top: 16px;
      position: relative;
      max-width: 100%;

      .fl-left {
        width: 100%;
        margin: auto;
        margin-top: $navigation-height * 1.5;
        max-width: 500px;
        float: none;

        body.index & {
          margin-top: $navigation-height * 2;
        }
      }

      .fl-right {
        display: none;
      }

      .small-illustration {
        max-width: 30%;
        display: block;
        margin: auto;

        img {
          width: 100%;
        }
      }

      h1 {
        font-size: 28px;
      }

      .btn {
        max-width: 100%;
      }

      #json-response-text {
        text-align: left;
      }
    }

    &.shrink {
      min-height: 314px;
    }

    .fl-right svg {
      max-width: 260px;
      position: relative;
      top: -20px;

      path,
      ellipse {
        transform: translateY(12px);
      }
    }
  }
}

/* Sections
=========================*/

.marketing-section {
  .container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    @include medium-mq {
      position: relative;
      transform: none;
      top: inherit;
      left: inherit;
      padding: 4em 16px;
    }
  }

  .bloc-5 {
    margin-bottom: 40px;
    position: relative;

    &:nth-child(1),
    &:nth-child(3) {
      padding-right: 10px;
    }

    &:nth-child(2),
    &:nth-child(4) {
      padding-left: 10px;
    }

    @include medium-mq {
      width: 100%;
      padding: 0 !important;

      .bloc-3 {
        position: relative;
        height: 100%;

        img {
          width: 100%;
          position: relative;
          top: -10px;
          left: -8px;
        }
      }
    }

    @include tablet-mq-portrait {
      .bloc-7 {
        padding-right: 16px;
      }
      .bloc-3 img {
        max-width: 50%;
        top: 0;
        left: 0;
      }
    }

    @include small-mq {
      .bloc-3 img {
        top: 10px;
      }
    }
  }

  .bloc-3 {
    img {
      width: 90%;
      margin: 0 auto;
      display: block;
      float: none;
      padding: 0 16px 16px;

      max-width: 140px;
    }
  }

  h3.title ~ p {
    margin: 0;
    font-size: 16px;
    line-height: 22px;
  }
}

////
.examples-section {
  padding-bottom: 3em;

  .bloc-5 {
    padding: 1em;

    @include small-mq {
      width: 100%;
    }
  }

  .row:nth-of-type(1) {
    margin-top: 5em;
  }

  h3.title {
    margin-top: 1em;
  }

  h3.title ~ p {
    margin: 0;
    font-size: 16px;
  }
}

////
.action-section {
  background: url('../images/svg/search-everywhere-illu.svg') no-repeat center
    bottom / 38%;
  padding-bottom: 300px;
  margin-bottom: -120px;

  @include medium-mq {
    background: $pale-grey url('../images/svg/search-everywhere-illu.svg')
      no-repeat center bottom / 58%;
  }

  @include big-min-mq {
    background: $pale-grey url('../images/svg/search-everywhere-illu.svg')
      no-repeat center bottom / 28%;
  }

  @include small-mq {
    padding-bottom: 260px;

    .btn.btn-cta {
      max-width: 100%;
      width: 100%;
    }
  }
}
